<template>
  <div id="app">
    <div class="main">
      <!--导航栏-->
      <div class="header">
        <Header></Header>
      </div>
      <div class="nav">
        <Nav></Nav>
      </div>
      <div class="content" style="width: 100%;">
        <div class="main_content" style="height: 880px;width: 1200px;margin: auto; ">
          <!--头部标签-->
          <div class="nav_top">

            <div class="newsClass clearfix">
              <ul>
                <li><a href="/">婴幼教育</a></li>
                <li><a href="/">中小学班</a></li>
              </ul>
              <ul>
                <li><a href="/">学历教育</a></li>
                <li><a href="/">英语培训</a></li>
              </ul>
              <ul>
                <li><a href="/">出国考试</a></li>
                <li><a href="/">出国留学</a></li>
              </ul>
              <ul>
                <li><a href="/">小语种班</a></li>
                <li><a href="/">冬夏令营</a></li>
              </ul>
              <ul>
                <li><a href="/">资格考试</a></li>
                <li><a href="/">职业技能</a></li>
              </ul>
              <ul>
                <li><a href="/">电脑培训</a></li>
                <li><a href="/">管理培训</a></li>
              </ul>
              <ul>
                <li><a href="/">文体艺术</a></li>
                <li><a href="/">兴趣素养</a></li>
              </ul>
              <ul>
                <li><a href="/">课外辅导</a></li>
                <li><a href="/">半永久眉</a></li>
              </ul>
              <ul>
                <li><a href="/">美容机构</a></li>
                <li><a href="/">机构动态</a></li>
              </ul>
              <ul>
                <li><a href="/">餐饮讯息</a></li>
                <li><a href="/">餐饮信息</a></li>
              </ul>
              <ul>
                <li><a href="/">美容美体</a></li>
                <li><a href="/">餐饮小吃</a></li>
              </ul>
              <ul>
                <li><a href="/">最新招生</a></li>
                <li><a href="/">美食资讯</a></li>
              </ul>
            </div>
          </div>

          <!--侧边栏-->
          <div class="right_content" style="float: right;margin-top: 20px">
            <div class="right-box-list">
              <div class="right-travel"><a href="/" target="_blank" class="orangebtn" rel="nofollow">帮我选课</a></div>
              <div class="right-tit-box">
                <h3><a>热门资讯</a></h3>
                <div class="index-news-cont">
                  <ul>
                    <li><a href="/" target="_blank" title="拱墅语言发育迟缓康复中心"><i class="attIcon"></i>拱墅语言发育迟缓康复中心 </a></li>
                    <li><a href="/" target="_blank" title=" 2022年南昌中专学校怎么样"><i class="attIcon"></i> 2022年南昌中专学校怎么样 </a></li>
                    <li><a href="/" target="_blank" title="建德语言迟缓培训1对1"><i class="attIcon"></i>建德语言迟缓培训1对1 </a></li>
                    <li><a href="/" target="_blank" title="桐庐吐字不清培训1对1"><i class="attIcon"></i>桐庐吐字不清培训1对1 </a></li>
                    <li><a href="/" target="_blank" title="漳州哪里有高低压电工操作证多少钱"><i class="attIcon"></i>漳州哪里有高低压电工操作证多少钱 </a></li>
                    <li><a href="/" target="_blank" title="厦门培训电工操作证培训"><i class="attIcon"></i>厦门培训电工操作证培训 </a></li>
                    <li><a href="/" target="_blank" title="杭州雅恩口吃培训"><i class="attIcon"></i>杭州雅恩口吃培训 </a></li>
                    <li><a href="/" target="_blank" title="晋江市安监局考电工证哪里培训"><i class="attIcon"></i>晋江市安监局考电工证哪里培训 </a></li>
                    <li><a href="/" target="_blank" title="漳州龙海市安监局高空作业证电工证考试"><i class="attIcon"></i>漳州龙海市安监局高空作业证电工证... </a></li>
                    <li><a href="/" target="_blank" title="萧山孤独症训练"><i class="attIcon"></i>萧山孤独症训练 </a></li>
                  </ul>

                </div>
              </div>
            </div>
          </div>

          <!--主内容-->
          <div class="main_content" style="margin-top: 20px">
            <div class="article-box" v-for="(item,index) in tableData">
              <div class="tag-list-box">
                <div class="tag-list-box_pic">
                  <a href="" target="_blank">
                    <img :src="'static/Dynamic_img/'+item.img"alt="深圳时代财务大厦美联托福培训上课时间">
                  </a>
                </div>
                <div class="tag-list-box-text">
                  <h2><a href="/" target="_blank">{{item.title}}</a></h2>
                  <div class="tag-list-box-author">
                    <span>时间：{{item.time}}</span><cite>｜</cite>
                    <a href="" target="_blank">{{item.adress}}</a>
                  </div>
                  <p><a href="/" target="_blank">{{item.des}}</a></p>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div style="margin-left: 150px;margin-bottom: 30px">
          <el-pagination
            layout="prev, pager, next"
            :total="50">
          </el-pagination>
        </div>


      </div>
      <!--底部-->
      <div class="footer">
        <Footer></Footer>
      </div>
    </div>
  </div>
</template>
<script>
  import Header from "../components/Header";
  import Footer from "../components/Footer";
  import Nav from "../components/Nav";
  export default {
    name: "Index",
    data(){
      return{
        tableData: [{}],
      }
    },
    methods:{
      // 初始页currentPage、初始每页数据数pagesize和数据data
      handleSizeChange: function (size) {
        this.pagesize = size;
        console.log(this.pagesize)  //每页下拉显示数据
      },
      handleCurrentChange: function(currentPage){
        this.currentPage = currentPage;
        console.log(this.currentPage)  //点击第几页
      },
      /*查询所有资讯*/
      findAll(){
        let _this = this
        this.$axios.get("http://localhost:8066/dynamic/getDynamic").then(function(res){
          _this.tableData = res.data
          console.log(res.data)
        }).catch(function (err) {
          alert('查询失败')
        })
      },

    },
    components:{
      Footer,
      Header,
      Nav
    },
    //初始化阶段 brforeCreate 内部事件 生命周期
    created(){
      this.findAll();
    }
  }
</script>

<style scoped>

  .article-box {
    float: left;
    width: 830px;
  }

  .tag-list-box {
    border-bottom: 1px solid #eeeeef;
    padding: 0 0 30px;
    margin-bottom: 30px;
    vertical-align: middle;
    overflow: hidden;
  }

  .tag-list-box_pic {
    float: left;
    padding-right: 30px;
  }

  .tag-list-box_pic a {
    display: block;
    width: 230px;
    height: 130px;
    overflow: hidden;
  }
  a {
    text-decoration: none;
    color: #666666;
  }

  .tag-list-box_pic a img {
    width: 100%;
  }

  img {
    vertical-align: middle;
  }

  .tag-list-box-text {
    display: table-cell;
    vertical-align: top;
    width: 10000px;
  }



  .tag-list-box-text h2 {
    color: #010101;
    font-size: 18px;
    font-weight: bold;
    line-height: 30px;
  }

  .tag-list-box-text h2 a {
    color: #010101;
  }

  .tag-list-box-author {
    color: #bbbbbb;
    padding: 8px 0 10px;
    font-size: 14px;
    line-height: 23px;
  }

  .tag-list-box-author span {
    padding: 0 18px;
  }

  .tag-list-box-author cite {
    color: #9ea1a4;
  }

  cite {
    font-style: italic;
  }



  .tag-list-box-author a {
    white-space: nowrap;
    color: #bbbbbb;
    font-size: 14px;
    height: 18px;
    line-height: 18px;
    padding-left: 18px;
  }

  .tag-list-box-text p {
    color: #666464;
    font-size: 14px;
    line-height: 21px;
    height: 42px;
    overflow: hidden;
  }

  .tag-list-box-text p a {
    color: #666464;
  }
  .right-travel {
    width: 340px;
    height: 115px;
    background: url(https://static.pxto.com.cn/statics/Home/Addons/news/images/135442hq84xxpns9nrdx81.jpg) no-repeat center;
    margin-bottom: 20px;
    padding-top: 80px;
  }

  .right-travel .orangebtn {
    display: block;
    background: #f90;
    width: 180px;
    height: 35px;
    line-height: 35px;
    vertical-align: middle;
    text-align: center;
    margin: 0 auto;
    border-radius: 5px;
    color: #fff;
  }
  a {
    text-decoration: none;
  }

  .right-tit-box {
    background-color: #f5f4f4;
    padding: 20px 0;
    margin-bottom: 20px;
  }

  .right-tit-box h3 {
    border-left: 6px solid #db0b2e;
    padding-left: 12px;
    font-size: 20px;
    font-weight: bold;
    line-height: 24px;
    color: #000;
  }

  a {
    text-decoration: none;
    color: #666666;
  }

  .index-news-cont {
    padding: 10px 30px 0;
  }

  .index-news-cont ul {
    padding-left: 15px;
  }

  .index-news-cont ul li {
    list-style: disc;
    padding: 10px 0;
  }

  .index-news-cont ul li a {
    word-break: break-all;
    line-height: 20px;
    font-size: 14px;
  }

  i, em {
    font-style: normal;
  }

  .right-box-list {
    float: left;
    width: 340px;
    margin-left: 30px;
  }

  .newsClass {
    margin: 0 auto;
    background: #f9f9f9;
    width: 1200px;
    border: 1px solid #ddd;
    line-height: 24px;
    padding-bottom: 20px;
    margin-top: 20px;
    height: 71px;
    overflow: hidden;
  }
  .newsClass ul {
    float: left;
    margin-left: 19px;
    width: 80px;
    font-size: 14px;
  }

  .newsClass ul li {
    width: 79px;
    border-right: 1px solid #DDDDDD;
    height: 16px;
    margin: 12px 0 10px;
    line-height: 16px;
  }

  .newsClass a {
    color: #333;
  }

  a {
    text-decoration: none;
  }

  ol, ul, li {
    list-style: none outside none;
    margin: 0;
    padding: 0;
  }

  ul {
    display: block;
    margin-block-start: 1em;
    margin-block-end: 1em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    padding-inline-start: 40px;
  }
</style>
